﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business.IManager;
using Business.Manager;
using Entity;
using Utility;
using System.Data;
using System.Collections;
namespace OnlinePayment.OP
{
    public partial class OpenEmailMentionView : System.Web.UI.Page
    {
        Student stu;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["User"] == null)
            {
                Response.Redirect("../Default.aspx");
            }
            else
            {
                stu = (Student)Session["User"];
                lblStuID.Text = stu.StudentId;
            }
        }

        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            
                IAccountManager studentManager = new AccountManager();
                if (studentManager.openEmailService(stu, txtMail.Text))
                {
                    Response.Write("<script language='javascript'>alert('开通成功！');</script>");
                }
                else
                {
                    Response.Write("<script language='javascript'>alert('开通失败！');</script>");
                }


           
        }
    }
}